namespace PickGold.Charting
{
    using System;
    using System.Drawing;
    using System.Security.Permissions;
    using System.Web;

    [SRDescription("DescriptionAttributeLegendCellCollection_LegendCellCollection"), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
    public class LegendCellCollection : ChartNamedElementCollection<LegendCell>
    {
        internal LegendCellCollection(LegendItem parent) : base(parent)
        {
        }

        public int Add(LegendCellType cellType, string text, ContentAlignment alignment)
        {
            base.Add(new LegendCell(cellType, text, alignment));
            return (base.Count - 1);
        }

        public void Insert(int index, LegendCellType cellType, string text, ContentAlignment alignment)
        {
            base.Insert(index, new LegendCell(cellType, text, alignment));
        }
    }
}

